import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopOrderAftersaleLogController } from '../../../controllers';
const uctoominishopOrderAftersaleLogRouter = new Router();
const minishopOrderAftersaleLogController = new uctooMinishopOrderAftersaleLogController();

uctoominishopOrderAftersaleLogRouter.post('/add', requireUser, minishopOrderAftersaleLogController.add);
uctoominishopOrderAftersaleLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_order_aftersale_log'), minishopOrderAftersaleLogController.edit);
uctoominishopOrderAftersaleLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_order_aftersale_log'), minishopOrderAftersaleLogController.delete);

//For getting minishopOrderAftersaleLog with permission control
uctoominishopOrderAftersaleLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_order_aftersale_log'), minishopOrderAftersaleLogController.getSingle);
uctoominishopOrderAftersaleLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_order_aftersale_log'), minishopOrderAftersaleLogController.getMany);
uctoominishopOrderAftersaleLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_order_aftersale_log'), minishopOrderAftersaleLogController.getMany);

//#endregion AutoCreateCode
export default uctoominishopOrderAftersaleLogRouter;
